//Ball.h//

#pragma once

#include "Vector.h"
#include <vector>

class Ball {
      public:
		  Ball::Ball();

		  //Accessor.
		  const double GetMass () const { return itsMass; }
	     
		  void SetMass (float x) { itsMass = x; }

		  double GetSlope () const { return ( Vel().y / Vel().x ); }

		  //for friction
		  void SetTestsAfterCollision() 
				{times += 1;}

		  void SetTestsAfterCollision(int x)  //used to set back to 0 after a collision
				{times = x;}

		  const int  GetTestsAfterCollision() const
				{return times;}


    // Member interface
    public:
          const Math::Vector2d& Pos() const
		     { return itsPosVector; }
          
          void Pos(const Math::Vector2d pos)
              { itsPosVector = pos; }
              
          const Math::Vector2d& OldPos() const
              { return oldPos; }

          void OldPos(const Math::Vector2d pos)
			  { oldPos = pos; }
              
          const Math::Vector2d& Vel() const
              { return itsVelVector; }

          void Vel(const Math::Vector2d vel)
              { itsVelVector = vel; }
              
          const double Alpha() const
              { return alpha; }
              
          void Alpha(double alpha)
              { this->alpha = alpha; }

		  //for friction
		  const Math::Vector2d& OldVel() const
              { return oldVel; }

          void OldVel(const Math::Vector2d vel)
			  { oldVel = vel; }
              
      private:
		  Math::Vector2d itsPosVector;
		  Math::Vector2d itsVelVector;
		  Math::Vector2d oldVel;
		  Math::Vector2d oldPos;
		  double alpha;
		  double itsMass;
		  int times;
};
